<!DOCTYPE html>
<html style="background-color: #F2F2F2;">
<head>
	
	<title><?php echo _MANAGER_TITLE_; ?></title>

	<?php $this->setFlag('list,vue'); ?>
	<?php $this->import('meta'); ?>

	<link rel="stylesheet" type="text/css" href="html/console/account/css/user.css" />

    <script type="text/javascript" src="html/console/account/js/user.js?v=11"></script>

</head>
<body>

	<div style="display: none;"></div>
	<div id="loadSpin" class="bg"></div>

	<div id="mainBg" class="bg" style="display: none;">

		<input type="text" id="statusInfo" class="display-none" />

		<div class="condition-bar">
			<div class="option-bar">
				<div class="option-item" onclick="showOption('1')">
                    <span id="optionItemText1" class="option-item-text">状态</span>
                    <span><img id="optionItemimg1" src="static/pic/app/option_down.png" class="option-item-img" /></span>
                </div>
                <div class="option-more" onclick="openSlipSearchDiv()">
	                <img src="static/pic/app/option_more.png" class="option-more-img" />
	            </div>
			</div>
		</div>
		<div class="condition-empty-area"></div>

		<div class="count-bar">
			共 <span id="listCount" class="count-color">0</span> 个用户
		</div>

		<div id="listBar">
			<div v-bind:id="'userInfo' + user.userid" v-for="user in list">
				<div class="list-bar">
					<template v-if="user.isuse == 0">
                        <img class="list-top" src="static/pic/app/nouse.png" />
                    </template>
        			<div class="list-title">{{ user.name }}</div>
        			<div class="list-remark">
        				<div class="list-remark-left">登录账号：{{ user.username }}</div>
        			</div>
                    <div class="list-remark2">
                        <div class="list-remark-left">角色权限：{{ user.role == '' ? '--' : user.role }}</div>
                    </div>
                    <div class="list-remark2">
                        <div class="list-remark-left">最近登录：{{ user.logintime == '' ? '--' : user.logintime }}</div>
                    </div>
        		</div>
        		<div class="list-tool">
        			<div class="list-tool-left"></div>
        			<div class="list-tool-btn" v-on:click="editUser(user.userid)">编辑</div>
        			<div class="list-tool-btn2" v-on:click="editRole(user.userid, user.name)">修改权限</div>
        			<div class="list-tool-btn2" v-on:click="resetUsername(user.userid, user.name)">重置账号</div>
        			<div class="list-tool-btn2" v-on:click="resetPassword(user.userid, user.name)">重置密码</div>
        		</div>
				<div class="list-separate"></div>
			</div>
		</div>

		<div id="bottomed" class="bottom-tip">没有更多了</div>

		<?php $this->import('totop'); ?>
		<?php $this->import('slipoption'); ?>
		<?php $this->import('slipedit'); ?>
		<?php $this->import('slipselect'); ?>
		<?php $this->import('slipsearch'); ?>



		<div id="optionItemFloatDiv1" class="option-item-float-div1" style="display: none;">
        	<div class="select-item" onclick="selectOption(this, '', 'statusInfo', '状态')">
                <div class="select-text-click">全部</div>
                <img class="select-img" src="static/pic/app/option_click.png" />
            </div>
        	<div class="select-item" onclick="selectOption(this, '1', 'statusInfo', '启用')">
                <div class="select-text">启用</div>
                <img class="select-img" src="static/pic/app/option_click.png" style="display: none;" />
            </div>
            <div class="select-item" onclick="selectOption(this, '0', 'statusInfo', '关闭')">
                <div class="select-text">关闭</div>
                <img class="select-img" src="static/pic/app/option_click.png" style="display: none;" />
            </div>
        </div>



        <div id="userBar" style="display: none;">
        	<div class="slipedit-info-bar">
        		<div class="slipedit-info-tr">
        			<div class="slipedit-info-tr-field">姓名</div>
        			<input type="text" id="usermc" class="slipedit-info-tr-input" placeholder="请填写姓名" autocomplete="off" />
        			<img class="slipedit-info-tr-img" src="static/pic/app/right.png" />
        		</div>
        		<div class="slipedit-info-tr">
        			<div class="slipedit-info-tr-field">账号</div>
        			<input type="text" id="username" class="slipedit-info-tr-input" placeholder="请填写账号" autocomplete="off" />
        			<img class="slipedit-info-tr-img" src="static/pic/app/right.png" />
        		</div>
        		<div class="slipedit-info-tr">
        			<div class="slipedit-info-tr-field2">是否启用</div>
					<div id="statusDiv" class="slipedit-info-onoff" onclick="isUse()"><div id="statusBtnDiv" class="slipedit-info-onoff-btn"></div></div>
					<input type="text" id="userstatus" class="display-none" />
        		</div>
        	</div>
        </div>

        <div id="roleBar" style="display: none;">
        	<div class="slipedit-info-bar">
        		<div class="slipedit-info-tr">
        			<div class="slipedit-info-tr-field">角色类型</div>
        			<input type="text" id="roleType" class="slipedit-info-tr-input" placeholder="请选择角色类型" autocomplete="off" readonly="readonly" onclick="selectRoleType()" onchange="getRoleName()" />
        			<img class="slipedit-info-tr-img" src="static/pic/app/right.png" />
        			<input type="text" id="roleTypeId" class="display-none" />
        		</div>
        		<div class="slipedit-info-tr">
        			<div class="slipedit-info-tr-field">角色名称</div>
        			<input type="text" id="roleName" class="slipedit-info-tr-input" placeholder="请选择角色名称" autocomplete="off" readonly="readonly" onclick="selectRoleName()" />
        			<img class="slipedit-info-tr-img" src="static/pic/app/right.png" />
        			<input type="text" id="roleNameId" class="display-none" />
        		</div>
        	</div>
        </div>

        <div id="pwdBar" style="display: none;">
        	<div class="slipedit-info-bar">
        		<div class="slipedit-info-tr">
	        		<div class="slipedit-info-tr-field">新密码</div>
					<input type="text" id="password" class="slipedit-info-tr-input" placeholder="请填写新密码" autocomplete="off" />
					<img class="slipedit-info-tr-img" src="static/pic/app/right.png" />
				</div>
        	</div>
        </div>



        <div id="roleTypeSelectBar" style="display: none;">
        	<div class="select-bar">
        		<div class="select-option" onclick="selectOptionItem('roleType', '管理岗', 'roleTypeId', '0')">管理岗</div>
	        	<div class="select-option" onclick="selectOptionItem('roleType', '运营岗', 'roleTypeId', '1')">运营岗</div>
	        	<div class="select-option" onclick="selectOptionItem('roleType', '研发岗', 'roleTypeId', '2')">研发岗</div>
	        	<div class="select-option" onclick="selectOptionItem('roleType', '试用岗', 'roleTypeId', '3')">试用岗</div>
        	</div>
        </div>

        <div id="roleNameSelectBar" style="display: none;">
        	<div class="select-bar">
        		<div class="select-option" onclick="selectOptionItem('roleName', 'XXX', 'roleNameId', 'XXX')">XXX</div>
        	</div>
        </div>



		<script type="text/javascript">
            var userList = new Vue({
                el: '#listBar',
                data: {
                    list: ''
                }
            });
        </script>

	</div>

</body>
</html>